package abs.service;

import abs.mapper.UserMapper;
import abs.vo.UserInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@Service
public class UserService {
    @Autowired
    private UserMapper userMapper;

    public UserInfo login(String userName, String password){
        return userMapper.login(userName, password);
    }

    public UserInfo findUserByName(String userName){
        return userMapper.findUserByName(userName);
    }

    public void register(UserInfo userInfo){
        userMapper.register(userInfo);
    }

    public List<UserInfo> getAllUser(String userName){
        return userMapper.getAllUser(userName);
    }

    public void changeUserInfo(UserInfo userInfo){
        userMapper.changeUserInfo(userInfo);
    }
    public void changePassword(String userName, String password){
        userMapper.changePassword(userName, password);
    }

}
